package com.javarush.test.level04.lesson10.task05;

/**
 * Created by IntelliJ IDEA.
 * User: Andry
 * Date: 03.02.13
 * Time: 4:34
 * To change this template use File | Settings | File Templates.
 */
public class Solution
{
    public static void main(String[] args) throws Exception
    {
        //Напишите тут ваш код
        int tm[][] = new int[10][10];
        int z = 1;
        for (int i = 0; i < 10; i++)
        {
            if (i == 0)
            {
                for (int j = 0; j < 10; j++)
                {
                    tm[i][j] = j + 1;
                }
            }
            else
            {
                for (int j = 0; j < 10; j++)
                {
                    if (j == (z - 1))
                    {
                        tm[i][j] = i + 1;
                    }
                    else
                    {
                        int x, y;
                        x = tm[0][j];
                        y = tm[i][0];
                        tm[i][j] = x * y;
                    }
                }
            }
        }

        int f;
        for (int i = 0; i < 10; i++)
        {
            for (int j = 0; j < 10; j++)
            {
                f = tm[j][i];
                System.out.print(f + "  ");
            }
            System.out.println();
        }

    }
}
